package com.supinfo.food.entities;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;

/**
 * An order
 * @author Keitaro
 *
 */
@Entity
public class Order implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue (strategy = GenerationType.AUTO)
	private Long id;
	@ManyToOne @JoinColumn
	private Customer customer;
	@ManyToMany
	private List<Dish> dish;
	@ManyToMany
	private List<Menu> menu;
	
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	public Customer getCustomer() {
		return customer;
	}
	
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	
	public List<Dish> getDish() {
		return dish;
	}
	
	public void setDish(List<Dish> dish) {
		this.dish = dish;
	}
	
	public List<Menu> getMenu() {
		return menu;
	}
	
	public void setMenu(List<Menu> menu) {
		this.menu = menu;
	}
	
}
